package net.hn.hnms.biz.sewage.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.hn.hnms.biz.sewage.entity.IndustrialWastewaterShiftEntity;
import net.hn.hnms.biz.sewage.service.IndustrialWastewaterService;
import net.hn.hnms.sys.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 智呈物联 nzw
 * @date 2022/9/22
 */
@RestController
@RequestMapping("safety/sewage/industrialWastewater")
@Api(value = "工业污水", tags = {"工业污水"})
public class IndustrialWastewaterController {

    private IndustrialWastewaterService industrialWastewaterService;

    @Autowired
    public void setIndustrialWastewaterService(IndustrialWastewaterService industrialWastewaterService) {
        this.industrialWastewaterService = industrialWastewaterService;
    }


    @ApiOperation("工业污水添加")
    @PostMapping("/add")
    public R add(@RequestBody IndustrialWastewaterShiftEntity industrialWastewaterShiftEntity){
        industrialWastewaterService.save(industrialWastewaterShiftEntity);
        return R.ok();
    }

    @ApiOperation("工业污水添加")
    @PostMapping("/update")
    public R update(@RequestBody IndustrialWastewaterShiftEntity industrialWastewaterShiftEntity){
        industrialWastewaterService.save(industrialWastewaterShiftEntity);
        return R.ok();
    }

//    @ApiOperation("工业污水删除")
//    @GetMapping("/delete")
//    public R delete(Long id){
//        return R.ok();
//    }
}
